from django.contrib import admin
from instafeed.subscriptions.models import ServerSubscriber, CloudServer, FeedSubscription

class ServerSubscriberAdmin(admin.ModelAdmin):
    list_display = ('server', 'host', 'port', 'path', 'notifyProcedure',
        'protocol', 'fail_count', 'expiration_date')
    list_filter = ('server', 'host', 'port', 'protocol', 'fail_count', 'expiration_date')

class CloudServerAdmin(admin.ModelAdmin):
    list_display = ('name', 'url', 'user', 'last_update', 'last_entry_id')
    list_filter = ('user', 'last_update')

class FeedSubscriptionAdmin(admin.ModelAdmin):
    list_display = ('name', 'url', 'user', 'last_update', 'last_entry_id')
    list_filter = ('user', 'last_update')

admin.site.register(ServerSubscriber, ServerSubscriberAdmin)
admin.site.register(CloudServer, CloudServerAdmin)
admin.site.register(FeedSubscription, FeedSubscriptionAdmin)
